Page({
  data: {
    // 小区名称
    street: '',
    // 楼/栋名称
    building: '',
    // 房间号
    rooms: []
  },
  onLoad(options) {
    console.log(options);
    // 6层4户
    this.fack(options, 6, 4)
  },
  fack(options, floorNum, roomNum) {
    // 初始化房间信息
    const room = []
    // 循环遍历得到几层几户
    for (let i = 0; i < floorNum; i++) {
      for (let j = 0; j < roomNum; j++) {
        room.push((i + 1) + '0' + (j + 1))
      }
    }
    this.setData({
      street: options.street,
      building: options.building,
      rooms: room
    })
  }
})